import { createStore } from 'vuex'
const store = createStore({
  state () {
    return {
      count: 0
    }
  },
  mutations: {
    increment (state,num) {
      // state.count++
      state.count = state.count+num
    }
  },
  actions:{
    asyncIncrement({ commit, state },num){
      commit("increment",num)
    }
  }
})
export default store